/*****************************************************************************/
/*!	\file		PrintView.h
 *	\brief		Header file for the YX-PIS Example
 *	\par		Dalian Yunxing Tech Co., Ltd.
 *
 *				Dalian, China
 *				Phone   : +86 (411) 8825 4852
 *				Email   : yx@yunxing.tech
 */
/*****************************************************************************/
#ifndef PRINT_VIEW_INCLUDED
#define PRINT_VIEW_INCLUDED 1

#include <stdio.h>
#include "IEC61850Types.h"


void PrintServerFullView();
void PrintServerHeader();
void PrintDataView();
void PrintErrorString();
void PrintServerMenuView();

void PrintClientFullView();
void PrintClientHeader();
void PrintClientMenuView();
void PrintReportMenuView();
void PrintControlMenuView();
void PrintFileMenuView();
void PrintLogMenuView();
void PrintSettingGroupMenuView();
void PrintDataAccessMenuView();

void PrintServerSubscriptionFullView();
void PrintServerSubscriptionHeader();
void PrintServerSubscriptionDataView();
void PrintServerSubscriptionMenuView();

const char* BooleanToString(Boolean inBool);
const char* DBPosToString(eDbPosValues inDBPosVal);
void ClearScreen();

void PrintStringList(StringList* list);
void PrintServiceError(eServiceError error);
void PrintMoreFollows(Boolean moreFollows);
void PrintTimeStamp(IEC61850_TimeStamp* timestamp);
void PrintQuality(void* quality, unsigned int printLevel, Boolean bDetailed);

void PrintBRCBValues(BRCBValues* brcbVal);
void PrintURCBValues(URCBValues* urcbVal);
void PrintRCBValues(RCBValues* rcbValues, Boolean buffFlag);
void PrintLogCBVals(LCBValues* lcbValues);
void PrintGoCBVals(GoCBValues* cbValues);
void PrintMSVCBVals(MSVCBValues* cbValues);
void PrintSGCBVals(SGCBValues* sgcbValues);
void PrintAllCBValues(GetAllCBValsReturn* allCBVals);
void PrintLogVals(IEC61850_LogEntries* logEntries);
void PrintLogStatus(IEC61850_LogStatus* logStatus);
void PrintDAVal(IEC61850_DataAttributeData* dataAttribute, int level);
void PrintDataType(unsigned int dataType, unsigned int bitLength, unsigned int printLevel);
void PrintDataValue(const IEC61850_DataAttributeData* value, unsigned int printLevel, Boolean bDetailed);
void PrintDataDefinition(DataDefinition* dataDefinition, unsigned int printLevel);

void PrintGetServerDirectoryResponse(GetServerDirectory_Response* response);
void PrintGetLogicalDeviceDirectoryResponse(GetLogicalDeviceDirectory_Response* response);
void PrintGetLogicalNodeDirectoryResponse(GetLogicalNodeDirectory_Response* response);
void PrintGetAllDataValuesResponse(GetAllDataValues_Response* response);
void PrintGetAllCBValuesResponse(GetAllCBValues_Response* response);
void PrintGetDataValuesResponse(GetDataValues_Response* response);
void PrintSetDataValuesResponse(SetDataValues_Response* response);
void PrintGetDataDirectoryResponse(GetDataDirectory_Response* response);
void PrintGetDataDefinitionResponse(GetDataDefinition_Response* response);
void PrintGetDataSetValuesResponse(GetDataSetValues_Response* response);
void PrintSetDataSetValuesResponse(SetDataSetValues_Response* response);
void PrintGetBRCBValuesResponse(GetBRCBValues_Response* response);
void PrintSetBRCBValuesResponse(SetBRCBValues_Response* response);
void PrintGetURCBValuesResponse(GetURCBValues_Response* response);
void PrintSetURCBValuesResponse(SetURCBValues_Response* response);

char* TranslateServiceError(eServiceError error);
char* TranslateSampleMode(SampleMode smpMod);
char* TranslateDataType(IEC61850_DataType type);

#endif
